package wechat.base.snd;

import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.json.JSONObject;
import wechat.base.snd.encoding.JsonPut;

@SuppressWarnings("all")
public class Department {
  @Accessors
  private String name;
  
  @Accessors
  private String parentid;
  
  @Accessors
  private String order;
  
  @Accessors
  private String id;
  
  public Department(final String name, final String parentid) {
    this.name = name;
    this.parentid = parentid;
  }
  
  public JSONObject jsonBuilder() {
    JsonPut _jsonPut = new JsonPut();
    final Procedure1<JsonPut> _function = new Procedure1<JsonPut>() {
      public void apply(final JsonPut it) {
        it.putObj("name", Department.this.name);
        it.putObj("parentid", Department.this.parentid);
        it.putObj("order", Department.this.order);
        it.putObj("id", Department.this.id);
      }
    };
    return ObjectExtensions.<JsonPut>operator_doubleArrow(_jsonPut, _function);
  }
  
  @Pure
  public String getName() {
    return this.name;
  }
  
  public void setName(final String name) {
    this.name = name;
  }
  
  @Pure
  public String getParentid() {
    return this.parentid;
  }
  
  public void setParentid(final String parentid) {
    this.parentid = parentid;
  }
  
  @Pure
  public String getOrder() {
    return this.order;
  }
  
  public void setOrder(final String order) {
    this.order = order;
  }
  
  @Pure
  public String getId() {
    return this.id;
  }
  
  public void setId(final String id) {
    this.id = id;
  }
}
